<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>接收用户的输入</title>
    <style>
        .form-item label{
            height:25px;
            width:10px;
        }
        .form-item input{
            height:25px;
            width:234px;

        }
        .form-item {
            margin:10px;
            border-radius:5px;
        }
        input[type=radio]{
            width:30px;

        }
    </style>
</head>
<body>
<form>
    <div class="form-item">
    <lable for="age">年龄：</lable>
    <input id="age" type="text" name="age">
    </div>

    <div class="form-item">
        <lable> </lable>
    <lable for="pass">密码：</lable>
    <input id="pass" type="password" name="pass">
    <!--<input type="button" value="提交" onclick="subform()">&lt;!&ndash;被单击时会调用subform()这个方法&ndash;&gt;-->
    </div>

<div class="form-item">
    <lable>性别：</lable>
    <input type="radio" name="sex" value="man" class="radio">男
    <input type="radio" name="sex" value="girl" class="radio">女
    <!--单选按钮，name必须相同-->
    </div>

    <div class="form-item">
    <lable>性别：</lable>
    <input type="button" value="提交" onclick="subform()"><!--被单击时会调用subform()这个方法-->
    </div>
</form>

<script>
function subform(){
    alert("哎呀");
}


</script>
</body>
</html>